//获取接口域名信息
function apiDomain() {
	var hostname = window.location.hostname;
	var port = window.location.port;
	if(hostname == "h5.7yingtech.com") {
		return "http://api.7yingtech.com/";
	} else {
		return "http://test-api.7yingtech.com/";
	}
}

function getClientType() {
	var ua = navigator.userAgent.toLowerCase();
	if(/iphone|ipad|ipod/.test(ua)) {
		return "ios";
	}
	if(/android/.test(ua)) {
		return "android";
	}
	return "android";
}

function GetQueryString(name) { // 截取url的字段
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if(r) return unescape(r[2]);
	return '';
}